//
//  HYPCImportViewCell.m
//  XPlayer
//
//  Created by liguoqing on 2023/9/14.
//

#import "HYPCImportViewCell.h"

@implementation HYPCImportViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self configUI];
    }
    return self;
}

- (void)configUI
{
    self.backgroundColor = kClearColor;
    [self.contentView addSubview:self.containerView];
    [self.containerView addSubview:self.firstLabel];
    [self.containerView addSubview:self.secendLabel];
    [self.containerView addSubview:self.thirdLabel];
    [self.containerView addSubview:self.fourLabel];
    [self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.top.mas_equalTo(5);
        make.right.mas_equalTo(-10);
        make.bottom.mas_equalTo(-5);
    }];
    [self.firstLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.top.mas_equalTo(10);
        make.right.mas_equalTo(-5);
    }];
    [self.secendLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.firstLabel.mas_left);
        make.top.equalTo(self.firstLabel.mas_bottom).offset(10);
        make.right.mas_equalTo(-5);
    }];
    [self.thirdLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.firstLabel.mas_left);
        make.top.equalTo(self.secendLabel.mas_bottom).offset(10);
        make.right.mas_equalTo(-5);
    }];
    [self.fourLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.firstLabel.mas_left);
        make.top.equalTo(self.thirdLabel.mas_bottom).offset(10);
        make.right.mas_equalTo(-5);
        make.bottom.equalTo(self.containerView).offset(-5);
    }];
}

#pragma mark - loadLazy

- (UIView *)containerView
{
    if(!_containerView){
        _containerView = [[UIView alloc]init];
        _containerView.backgroundColor = AppContentBgThemeColor;
        _containerView.layer.cornerRadius = 4.0;
        _containerView.layer.masksToBounds = YES;
        _containerView.layer.borderColor = [CommUtls colorWithHexString:APP_MGapColor].CGColor;
        _containerView.layer.borderWidth = kOneScale;
    }
    return _containerView;
}

- (UILabel *)headerLabel
{
    if(!_headerLabel){
        _headerLabel = [[UILabel alloc]init];
        _headerLabel.text = NSLocalizedString(@"PC导入", nil);
        _headerLabel.textColor = [UIColor systemBlueColor];
        _headerLabel.font = FONT_BOLD_SIZE(16);
    }
    return _headerLabel;
}

- (UILabel *)firstLabel
{
    if(!_firstLabel){
        _firstLabel = [[UILabel alloc]init];
        _firstLabel.text = NSLocalizedString(@"1.将iPhone和MAC使用USB进行连接；", nil);
        _firstLabel.font = FONT_SIZE(16);
        _firstLabel.textColor = APPTextThemeColor;
        _firstLabel.numberOfLines = 0;
    }
    return _firstLabel;
}

- (UILabel *)secendLabel
{
    if(!_secendLabel){
        _secendLabel = [[UILabel alloc]init];
        _secendLabel.text = NSLocalizedString(@"2.打开访达,选择当前iPhone；", nil);
        _secendLabel.font = FONT_SIZE(16);
        _secendLabel.textColor = APPTextThemeColor;
        _secendLabel.numberOfLines = 0;
    }
    return _secendLabel;
}

- (UILabel *)thirdLabel
{
    if(!_thirdLabel){
        _thirdLabel = [[UILabel alloc]init];
        _thirdLabel.text = NSLocalizedString(@"3.点击右侧‘文件’选项，选择‘VPlayer'，将文件拖入即可。", nil);
        _thirdLabel.font = FONT_SIZE(16);
        _thirdLabel.textColor = APPTextThemeColor;
        _thirdLabel.numberOfLines = 0;
    }
    return _thirdLabel;
}

- (UILabel *)fourLabel
{
    if(!_fourLabel){
        _fourLabel = [[UILabel alloc]init];
        _fourLabel.text = NSLocalizedString(@"4.返回首页，在'文件导入'中查看上传文件。", nil);
        _fourLabel.font = FONT_SIZE(16);
        _fourLabel.textColor = APPTextThemeColor;
        _fourLabel.numberOfLines = 0;
    }
    return _fourLabel;
}

- (UILabel *)fiveLabel
{
    if(!_fiveLabel){
        _fiveLabel = [[UILabel alloc]init];
        _fiveLabel.font = FONT_SIZE(16);
        _fiveLabel.textColor = APPTextThemeColor;
        _fiveLabel.numberOfLines = 0;
    }
    return _fiveLabel;
}

@end
